Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 28, 2024

  • Setting the module attribute for a class now removes the firstlineno item from the type's dict.
  • The _collections_abc and _pydecimal modules now completely replace the collections.abc and decimal modules after importing them. This allows to get the source of classes and functions defined in these modules.
  • inspect.findsource() now checks whether the first line number for a class is out of bound.

(cherry picked from commit 69a4063)


📚 Documentation preview 📚: https://cpython-previews--124735.org.readthedocs.build/

…__firstlineno__ in classes (pythonGH-123613)

* Setting the __module__ attribute for a class now removes the
  __firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
  collections.abc and decimal modules after importing them. This
  allows to get the source of classes and functions defined in these
  modules.
* inspect.findsource() now checks whether the first line number for a
  class is out of bound.
(cherry picked from commit 69a4063)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants